package com.sc.nft.service;

import com.sc.nft.entity.UserEcologyCastUpperLimit;
import com.sc.nft.enums.UserEcologyCastUpperLimitDetailsTypeEnum;

public interface UserEcologyCastUpperLimitService {

    /**
     * 新增铸造上限 并且添加铸造上限日志
     * @param userId
     * @param collectionId
     * @param count
     * @param type
     * @param eventsName
     * @param userRecordsId
     */
    void addCountByUserIdAndCollectionId(Long userId, Long collectionId, Integer count, UserEcologyCastUpperLimitDetailsTypeEnum type, String eventsName, Long userRecordsId);

    /**
     * 减少铸造上限 并且添加铸造上限日志
     * @param userId
     * @param collectionId
     * @param count
     * @param type
     * @param eventsName
     * @param userRecordsId
     */
    void subCountByUserIdAndCollectionId(Long userId, Long collectionId, Integer count, UserEcologyCastUpperLimitDetailsTypeEnum type, String eventsName, Long userRecordsId);

    /**
     * 获取用户藏品的铸造上限
     * @param userId
     * @param collectionId
     * @return
     */
    UserEcologyCastUpperLimit getOne(Long userId, Long collectionId);


    /**
     * 扣减用户可兑换次数
     * @param userId
     * @return
     */
    Boolean subExchangeCount(Long userId, Long collectionId,Integer count);
}
